The measurement of a three-dimensional shape has been used not only in an industrial field but also in social various fields such as medicine, biology, archaeology, and the examination and restoration of works of art. In the three-dimensional measurement, non-contact type optical measurement has been more desired than conventional contact type measurement. Region measurement in the optical measurement is broadly divided into a light section method of measuring a region by scanning the region with one linear slit light in a direction perpendicular to a direction of slit and a measurement method of measuring a region by a surface.
As for the light section method, although various modes have been developed, it is basically based on a principle shown in FIG. 1. That is, a measuring unit using the light section method includes a slit light projection system including a light source such as laser and a slit 1010 and a camera system including a lens 1012 and light receiving elements (light receiving plane thereof) 1013. That is, a slit light from the slit light projection system is projected to an object 1011 to be measured. In an example shown in FIG. 1, the slit light shown by hatch is projected to the object 1011 to be measured. The image of the slit light projected to the object 1011 to be measured is focused on the light receiving elements 1013 by use of the lens 1012 included in the camera system. For example, a point P (X, Y, Z) (where (X, Y, Z) are coordinate values in an actual coordinate system) on the object to be measured to which the slit light is projected is observed as p (x, y) (where (x, y) are coordinate values on the light receiving plane) on the light receiving elements (light receiving plane thereof) 1013. Here, the slit light projection system and the camera system of the measuring unit are moved at predetermined intervals in such a way that the measurement range of the object 1011 to be measured is scanned with the slit light, and the image of the slit light projected to the object 1011 to be measured is taken by the camera system every time both the systems are moved. Further, it is assumed that the intersection of a straight line (a single dot and dash line in FIG. 1) passing the center of the lens 1012 and perpendicular to the light receiving elements (light receiving plane thereof) 1013 and a plane of the slit light is a point Q and that the length of a line segment α connecting the center of the slit 1010 and the center of the lens 1012 of the slit light projection system is L.
Next, the positional relationship between the measuring unit and the object to be measured, which is shown in FIG. 1, will be described in detail by use of FIG. 2. Here, it is assumed that the center of the slit 1010 is a point R and that the center of the lens 1012 is a point S. At this time, an angle between a line segment RP and a line segment PS is β+γ and is divided into β and γ by a line (reference line) perpendicular to the line segment RS. Further, an angle between the line segment PR and a line segment RS is θ and an angle between the line segment PS and the line segment SR is Φ. Still further, an angle between a line segment QS overlapping a main axis and the line segment SR is Φ0, and Φ0−Φ=Φ′. Further, it is assumed that the distance between the point S and the light receiving plane 1013 of the light receiving elements is 1 and that the distance between the line segment RS and the point P is a length Z to be measured. With this, the following formula is established.
                    Z        =                                                            tan                ⁢                                                                  ⁢                                  θ                  ·                  tan                                ⁢                                                                  ⁢                Φ                            ⁢                                                                                                  tan                ⁢                                                                  ⁢                θ                            +                              tan                ⁢                                                                  ⁢                Φ                                              ·          L                                    [                  Mathematical          ⁢                                          ⁢          formula          ⁢                                          ⁢          1                ]            
Here, the point P is observed at a point p which is deviated by Δx with respect to the main axis on the light receiving plane 1013 of the light receiving elements, so that Φ′=tan−1(Δx/1) and hence Φ(=Φ0+Φ′) can be calculated. Therefore, if the angles θ, Φ0, and Φ′ and the lengths 1 and L are obtained, Z can be calculated according to the aforementioned mathematical formula. These parameters naturally include measurement errors.
In the light section method, a mechanical moving mechanism of the slit light projection system and the like is required, as described above, so that this causes a bottleneck and presents a problem that time required for measurement can not be shortened to decrease efficiency. Hence, there is a problem in applying the light section method to a field where the time required for measurement needs to be shortened. Further, the light section method presents a problem of taking a great deal of time and labor for maintenance and adjustment because it has the mechanical moving mechanism.
On the other hand, a typical method of measuring a region by a surface includes a moiré method of acquiring contour lines by moiré fringes and a fringe pattern projection method of observing a fringe pattern made by projecting a stripe-shaped grating pattern onto an object. The latter method has been expected at present, in particular, from the viewpoint of measurement accuracy and the cost of measuring unit.
The fringe pattern projection apparatus, as shown in FIG. 3, is usually divided into two systems: a projection system including a projection unit 1000, a projector lens 1002 and a grating 1001, and a camera system including a camera unit 1005 that takes the image of a deformed fringe pattern 1003 projected onto an object 1004 to be measured via a lens 1006. The projection unit 1000 projects a fringe made by a grating 1001 onto the object 1004 to be measured via the lens 1002. A fringe pattern produced by the projection is deformed by protrusions and depressions of the object 1004 to be measured. The camera unit 1005 takes the image of the deformed fringe pattern 1003 in a direction different from a direction of the projection, converts it to electric signals via light receiving elements such as CCDs (charge coupled devices), and stores the electric signals in a storage device. Then, by analyzing these, the three-dimensional shape of the object 1004 to be measured is measured. Here, each of the light receiving element outputs an electrical signal such as a voltage corresponding to light intensity at the point of the element. As for the grating 1001, in the past, it was fixedly formed on the surface of a glass plate or the like, but in recent times, a grating made by liquid crystal or the like has been brought into practical use, and a stripe-shaped grating realized in a liquid crystal device by a computer has been practically used.
Usually, a reference plane perpendicular to the optical axis of the projection unit 1000 is set, and on this reference plane, two axes of an axis Y in a direction of a fringe and an axis X perpendicular to the fringe are set. This is disclosed in detail in “Automatic Measurement of 3-D Object Shapes Based on Computer-generated Reference Surfaces” by H. Lu et al., Bull. Japan Soc. of Prec. Eng. Vol. 21, No. 4, p251 (1987). In this method, a fringe pattern is expressed as a wave of light intensity I with respect to positions on the axis X perpendicular to the fringe, and is analyzed by use of the phase Φ(=Φ2) of a wave in a case where the object 1004 to be measured is placed on the reference plane or by use of the difference ΔΦ(=Φ2−Φ1) between the phase Φ1 of a wave on the reference plane and the phase Φ2 of the wave in a case where the object 1004 to be measured is placed on the reference plane. With this, the fringe pattern projection method is also alternatively called “a modulated fringe phase method”. Here, it is because systematic errors caused in the measurement are eliminated by deduction to improve accuracy, that the difference ΔΦ of the phase of the wave is used. In this method, a fringe wave (pair of bright fringe and dark fringe) number can be arbitrarily set if they are relative to each other. Incidentally, calculation is usually performed on the assumption that a phase angle is 2π for 1 wavelength of the fringe wave.
A detailed calculation formula is disclosed in the aforementioned paper and hence its detailed description will be omitted here. To calculate ΔΦ, Φ1 is calculated from the optical geometric positional relationship such as the distance between the grating 1001 and the lens 1002, the distance between the intersection of the optical axis of the camera unit 1005 and the optical axis of the projection unit 1000 and the lens 1002, fringe interval, and the angle between the optical axis of the camera unit 1005 and the optical axis of the projection unit 1000. These geometrical positions naturally include measurement errors.
In addition to this, a method of calculating measurement values or the like by use of other calculation formula is also disclosed in “Three-Dimensional Shape Measurement by Liquid Crystal Grating Pattern Projection” by Ken Yamatani et al., Bull. Japan Soc. of Prec. Eng. Vol. 67, No. 5, p. 786 (2001) and “Fourier Transform Profilometry for the Automatic Measurement of 3-D Object Shapes” by Mitsuo Takeda et al., Applied OPTICS. Vol. 22, No. 24, p. 3977 (1983). In these papers, calculation is carried out commonly by use of measurement results of optical geometric positions.
Here, Φ2=2π×(fringe wave number)+(in-fringe phase angle) and Φ2 is calculated from measured values. In this manner, in the methods described above, in particular, the fringe wave number and the in-fringe phase angle need to be specified.
To acquire the in-fringe phase angle, scanning is performed along the X axis (see FIG. 3) in the direction perpendicular to the fringe, set on the reference plane. Not only in a sine wave fringe but also in a so-called Ronchi fringe in which fringe is binarized, the light intensity I of the fringe pattern is gradually changed along the X axis in the direction perpendicular to the fringe by optical diffraction phenomenon and discrete errors caused by light receiving elements in the vicinity of the boundaries of bright and dark fringes. This light intensity distribution is recognized as a wave, and the in-fringe phase angle from the base point of the sine wave as a starting point is calculated.
In order to calculate the in-fringe phase angle, it is known that assuming that light intensities when the fringe is shifted by π/2, π, 3π/2 are I0, I1, I2, and I3 on the condition that the sine wave grating is used, the in-fringe phase angle at an arbitrary point x can be calculated by the following formula. This method is considered to be “a position fixing type in-fringe phase angle calculation method”.
                                                        [                              Mathematical                ⁢                                                                  ⁢                formula                ⁢                                                                  ⁢                2                            ]                                                                                          Φ                ⁡                                  (                  x                  )                                            =                                                tan                                      -                    1                                                  ⁢                                                                                                    I                        3                                            ⁡                                              (                        x                        )                                                              -                                                                  I                        1                                            ⁡                                              (                        x                        )                                                                                                                                                I                        0                                            ⁡                                              (                        x                        )                                                              -                                                                  I                        2                                            ⁡                                              (                        x                        )                                                                                                                                                    (        1        )            
In addition to this, there are a method in which a in-fringe phase angle is made 0 at a point of the central value of a segment from a valley to a peak and a method of detecting peaks of a valley and a peak. However, in these methods, the positions where the in-fringe phase angle are 0, π/2, π, and 3π/2 are calculated by shifting the grating by π/2, π, 3π/2. This is considered to be “a phase angle fixing type position calculation method”. Even if either of the methods is used, the fringe number changes at a point where the in-fringe phase angle is 0, and one fringe wave is distinguished there.
As described above, in the fringe pattern projection method, if the fringe wave number is not determined, three-dimensional measurement cannot be performed. In a case where the fringe wave is continuous, the fringe wave number increases or decreases by one along the X axis, so that the phase difference ΔΦ can be easily calculated. However, the fringe becomes discontinuous in some cases. In a case where the fringe becomes discontinuous, the continuity of the fringe wave number cannot be used, so that the phase difference cannot be easily calculated. Further, if the fringe wave number is recognized by mistake, measurement errors are caused.
To cope with this problem, as for a method of acquiring the fringe wave number automatically while dealing with the discontinuity of the fringe, many researches on a white and black fringe, as summarized in “Three-Dimensional Shape Measurement by Liquid Crystal Grating Pattern Projection” by Ken Yamatani et al., Japan Soc. of Prec. Eng. Vol. 67, No. 5, p. 786 (2001), have been conducted. In addition to this, a method of using a color fringe has been known. Because this method of acquiring the fringe wave number is not a main object of this application, the further detailed explanation is omitted.
Further, JP-A-2003-65738 discloses the following technology. That is, to perform a camera calibration, the image of a flat plate having markers whose X and Y coordinates are already known is taken several times at different positions in a Z direction. With this, camera parameters are calculated from positions of the markers, which are not on the same plane, on the images and positions of the markers in a world coordinate system. Next, in order to acquire a fringe plane equation, fringe spatial positions are actually measured. At this time, a fringe pattern is projected to a flat plate by a projection unit. The image of the flat plate is taken by a camera unit at least two times at different positions in the Z direction moving the flat plate. Then, as for the respective projected fringes, spatial coordinates are acquired for at least three points Pa, Pb, and Pc, which are included in the optical plane (plane intersecting an X-Y plane) of the fringes and are not on a straight line. For this purpose, arbitrary two points Qa, Qb on a straight image by one fringe are determined in an image farther from the camera unit. The pixel coordinate positions Qa (ua, va), Qb (ub, vb) of these points Qa, Qb are determined. Similarly, one arbitrary point Qc on a straight image by the same fringe is determined in an image closer to the camera unit. The pixel coordinate position Qc (uc, vc) of this point Qc is calculated. Then, positions Pa (xa, ya, z1), Pb (xb, yb, z1), and Pc (xc, yc, z2) of the respective points on the fringe in the world coordinate system are determined by use of the pixel coordinate positions of these points Qa, Qb, and Qc, distances z1, z2, and the camera parameters. This processing is performed for all fringes of the fringe pattern. The determined positions (coordinate data) of the respective points are stored as fringe spatial positions in a storage device. Further, the respective fringe plane equations are determined on the basis of the fringe spatial positions and are stored in the storage device. Generally, the fringe plane equation is expressed by the following equation: ax+by+cz=d. As the data of the fringe plane equation, for example, parameters a, b, c, d of this equation are stored. Incidentally, while the coordinate positions of three points are determined for one fringe in the above description, it is also recommended that the coordinate positions of four points or more be determined by making the Z coordinate position of the flat plate or the position on an image dense. In this case, if these points are not coplanar, an approximate fringe plane equation is determined. Using this method, a fringe plane equation with more accuracy can be acquired.
In the technology like this, only acquisition of the fringe plane equations for the respective fringes is a purpose, so that the relationship between the fringes is not grasped and hence the whole space cannot be expressed correctly. Hence, correct measured values cannot be obtained in some case. In addition, while the calculation results of the camera parameters are used for calculating the fringe plane equations, what data the camera parameters are and the calculation method of the camera parameters are not explicitly described. Hence, in a case where the camera parameters are not calculated with sufficient accuracy, the accuracy of the fringe plane equation is also decreased.
As described above, in the conventional light section method, the measurement errors are included in the parameters necessary for the calculation and restrict measurement accuracy.
Further, in the fringe pattern projection method realized by the aforementioned conventional technology, “the fixed-position type in-fringe phase angle calculation method” is predicated on the sine wave fringe and the measurement accuracy depends on the degree of its realization, so researches on the improvement of the degree of the realization have been conducted. However, because the liquid crystal is discrete, it is clear that the degree of the realization of the sine wave fringe has a limitation and hence the measurement accuracy is restricted by this. Further, while efforts have been made to improve the accuracy of the coefficients of the equation in the conventional method, it is difficult to obtain values with high accuracy for all points in the volume to be measured. Still further, in the case of “the phase angle fixing type position calculation method”, different points are referenced, but errors are caused by the difference in the brightness on the background of the points referenced, thereby the accuracy is restricted.
In addition, in the fringe pattern projection method, the formula for calculating ΔΦ(and the like shown in the aforementioned papers includes calibration parameters, and these calibration parameters include errors and hence put limitations on accuracy. For example, in a case where the calibration parameter includes 0.2% error, if the error is caused by nonlinearity, an error of 0.4 mm is caused, when an object of 200 mm in width is measured.
Furthermore, there is also presented a problem that in a case where light reception data has system errors, these formulas cannot guarantee the industrially important horizontality of the measured value on the horizontal plane. The formulas in the aforementioned papers guarantee the horizontality only for the reference plane if accidental errors are not caused but do not guarantee the horizontality for the horizontal planes of the other heights.
Further, each of a fringe pattern projection lens and a fringe pattern taking lens has distortion aberration. For example, when an object of 200 mm in width is measured by use of a lens having a distortion aberration of 0.5%, an error of 1.0 mm is caused by the distortion aberration. Although measurement can be compensated to some extent by calculation, it is clear that there is a limitation on the compensation by the calculation. The problem of the distortion aberration is ditto for the light section method.
Still further, optical calibration is performed for a measurement coordinate system. However, when a measuring unit is mounted on a NC (numerical control) machine tool and measurement is performed and the NC machine tool is controlled by use of the measured data, the axis of the measuring unit does not agree with the axis of the machine tool, which causes errors. In this case, the calibration of the measuring unit by the coordinate system of the machine tool is desired, but a method of calibration has not been known.
Still further, conventionally, a high technique and a long time are required to calibrate the parameters of the measuring unit with high accuracy and hence a request of recalibration requiring high accuracy is usually made to a manufacturer of the measuring unit. In the case of using the measuring unit in the manufacture of products, there is presented an economic problem such as manufacture shutdown. A method has not been known by which anybody can easily perform calibration in a short time without any particular technique.